package cn.edu.cqut.service.impl;

import cn.edu.cqut.entity.DivideModel;
import cn.edu.cqut.entity.Orders;
import cn.edu.cqut.mapper.OrdersMapper;
import cn.edu.cqut.service.IOrdersService;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cqut-917371
 * @since 2020-06-24
 */
@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements IOrdersService {
	public Page<Orders> getOrdersByDate(Page<Orders> page, String date) {
		return baseMapper.selectOrderCountByDate(page, date);
	}

	@Override
	public List<DivideModel> getOrdersByCus_Name(String name) {
		return baseMapper.selectOrderByCus_Name(name);
	}

	@Override
	public List<DivideModel> getOrderByDate(String date) {
		return baseMapper.selectOrderByDate(date);
	}
}
